<template>
  <lb-layout
    class="tabs-content"
    v-loading="$store.getters.loading"
    element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="#a19f9fb0;"
    :paddBottom="5"
    :paddTop="0"
    :bottomHeight="120"
  >
    <formCom ref="formCom" :disabledFlage="true"></formCom>
  </lb-layout>
</template>

<script>
import formCom from "./form.vue";
import { detail } from "@/api/sensingEquipment/index.js";
export default {
  components: {
    formCom,
  },
  props: {
    id: {
      type: [Number, String],
      default: "",
    },
  },
  data() {
    return {};
  },
  created() {},
  mounted() {
    this.$nextTick(() => {
      this.getInfo();
    });
  },
  methods: {
    getInfo() {
      detail(this.id)
        .then((res) => {
          if (res.code === 700) {
            this.$message.warning(res.msg);
            return false;
          }
          let newData = res?.data ?? {};
          this.$refs?.formCom.setForm(newData);
        })
        .catch(() => {
          // this.$message.error("系统错误,请联系管理员!");
        });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
